from dotenv import load_dotenv

load_dotenv()

from sanic import Request, Sanic, file

from idcard_ocr.views.api import bp

app = Sanic(__name__)
app.blueprint(bp)


@app.route("/")
async def index(request: Request):
    return await file("./static/index.html")


app.static("/", "./static")


if __name__ == "__main__":
    app.run(host="127.0.0.1", port=8000, dev=True)
